/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package View;

import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Date;
import javax.swing.JLabel;

/**
 *
 * @author Nicolas
 */
public class Clock extends JLabel implements Runnable {

    @Override
    public void run() {
        while (true) {
            DateFormat dateFormat = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss");
            Date date = new Date();
            this.setText(dateFormat.format(date));
        }
    }
}
